package cn.tb.org.service.impl;

import cn.tb.basic.query.BaseQuery;
import cn.tb.basic.service.impl.BaseServiceImpl;
import cn.tb.basic.util.PageList;
import cn.tb.org.domain.DictionaryDetail;
import cn.tb.org.domain.DictionaryType;
import cn.tb.org.mapper.DictionaryDetailMapper;
import cn.tb.org.mapper.DictionaryTypeMapper;
import cn.tb.org.query.DictionaryDetailQuery;
import cn.tb.org.query.DictionaryTypeQuery;
import cn.tb.org.service.IDictionaryTypeSerivce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DictionaryTypeService extends BaseServiceImpl<DictionaryType> implements IDictionaryTypeSerivce {
    @Autowired
    private DictionaryTypeMapper dictionaryTypeMapper;
    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;

    @Override
    @Transactional
    public void deleteById(Long id) {
        Long types_id = id;
        dictionaryDetailMapper.deleteByTypes_id(types_id);
        dictionaryTypeMapper.deleteById(id);
    }

}
